import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '@/views/HomeView.vue'
import LogineView from '@/views/login.vue'
import RegisterView from '@/views/Register.vue'
import PersonView from '@/views/Person.vue'
import PasswordView from '@/views/password.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: '仪表盘',
      icon: 'Monitor',
      component: HomeView,
      meta: {
        isBreadcrumb: true,
        title: '仪表盘',
      },
      children: [
        {
          path: '/person',
          component: PersonView,
        },
        {
          path: '/password',
          component: PasswordView,
        }
      ]
    },
    
    {
      path: '/article',
      name: '文章管理',
      icon: 'Menu',
      component: HomeView,
      meta: {
        isBreadcrumb: true,
        title: '文章管理',
      },
      children: [
        {
          path: '/a',
          name: '文章管理列表',
          component: () => import(
            '@/views/A.vue'
          ),
          meta: {
            isBreadcrumb: true,
            title: '文章管理列表',
          },
        },
        {
         
          path: '/labinformation',
          name: '实验室管理列表',
          component: () => import(
            '@/views/lab/LaboratoryInformation.vue'
          ),
          meta: {
            isBreadcrumb: true,
            title: '文章管理列表',
          },
        }

      ]
   },
   {
    path: '/comment',
    name: '评论管理',
    icon: 'Message',
    component: HomeView,
    meta: {
      isBreadcrumb: true,
      title: '评论管理',
    },
    children: [
      {
        path: '/d',
        name: '评论管理列表',
        component: () => import(
          '@/views/D.vue'
        )
        ,meta: {
          isBreadcrumb: true,
          title: '评论管理列表',
        },
      }
    ],
    
 },
 {
  path: '/modules',
  name: '模块管理',
  icon: 'Files',
  meta: {
    isBreadcrumb: true,
    title: '模块管理',
  },
  component: HomeView,
  children: [
    {
      path: '/c',
      name: '模块管理列表',
      component: () => import(
        '@/views/C.vue'
      ),
      meta: {
        isBreadcrumb: true,
        title: '模块管理列表',
      },
    }
  ],
},
{
  path: '/system',
  name: '系统管理',
  icon: 'Setting',
  component: HomeView,
  meta: {
    isBreadcrumb: true,
    title: '系统管理',
  },
  children: [
    {
      path: '/class',
      name: '教学班管理',
      component: () => import(
        '../views/Class.vue'
      ),
      meta: {
        isBreadcrumb: true,
        title: '教学班管理',
      },
    }
  ],
  
},

{
  path: '/login',
  component: LogineView,

},
{
  path: '/register',
  component: RegisterView,
},

  ]
})

export default router
